package lenfs.util.constants;

public class NFSConst {

	public static final int MAXDATA = 8192;
	public static final int MAXPATHLEN = 1024;
	public static final int MAXNAMELEN = 255;
	public static final int COOKIESIZE = 4;
	public static final int FHSIZE = 32;
	public static final int FATTR_SIZE = 68;

	public static final int NFS_OK = 0;
	public static final int NFSERR_PERM = 1;
	public static final int NFSERR_NOENT = 2;
	public static final int NFSERR_IO = 5;
	public static final int NFSERR_NXIO = 6;
	public static final int NFSERR_ACCES = 13;
	public static final int NFSERR_EXIST = 17;
	public static final int NFSERR_NODEV = 19;
	public static final int NFSERR_NOTDIR = 20;
	public static final int NFSERR_ISDIR = 21;
	public static final int NFSERR_FBIG = 27;
	public static final int NFSERR_NOSPC = 28;
	public static final int NFSERR_ROFS = 30;
	public static final int NFSERR_NAMETOOLONG = 63;
	public static final int NFSERR_NOTEMPTY = 66;
	public static final int NFSERR_DQUOT = 69;
	public static final int NFSERR_STALE = 70;
	public static final int NFSERR_WFLUSH = 99;

	public static final int NFSPROC_NULL = 0;
	public static final int NFSPROC_GETATTR = 1;
	public static final int NFSPROC_SETATTR = 2;
	public static final int NFSPROC_LOOKUP = 4;
	public static final int NFSPROC_READ = 6;
	public static final int NFSPROC_WRITE = 8;
	public static final int NFSPROC_CREATE = 9;
	public static final int NFSPROC_REMOVE = 10;
	public static final int NFSPROC_RENAME = 11;
	public static final int NFSPROC_MKDIR = 14;
	public static final int NFSPROC_RMDIR = 15;
	public static final int NFSPROC_READDIR = 16;
	public static final int NFSPROC_STATFS = 17;

	public static final int NFNON = 0;
	public static final int NFREG = 1;
	public static final int NFDIR = 2;
	public static final int NFBLK = 3;
	public static final int NFCHR = 4;
	public static final int NFLNK = 5;

	public static final int MODE_NFDIR = 0040000;
	public static final int MODE_NFCHR = 0020000;
	public static final int MODE_NFBLK = 0060000;
	public static final int MODE_NFREG = 0100000;
	public static final int MODE_NFLNK = 0120000;
	public static final int MODE_NFNON = 0140000;
	public static final int MODE_SETUID = 0004000;
	public static final int MODE_SETGID = 0002000;
	public static final int MODE_SWAP = 0001000;
	public static final int PERM_OR = 0000400;
	public static final int PERM_OW = 0000200;
	public static final int PERM_OE = 0000100;
	public static final int PERM_GR = 0000040;
	public static final int PERM_GW = 0000020;
	public static final int PERM_GE = 0000010;
	public static final int PERM_AR = 0000004;
	public static final int PERM_AW = 0000002;
	public static final int PERM_AE = 0000001;
}
